\(\int \frac {x^{-1+\frac {q}{2}}}{\sqrt {b x^n+c x^{2 n-q}+a x^q}} \, dx\) [140]

   Optimal result
   Rubi [A] (verified)
   Mathematica [F]
   Maple [F]
   Fricas [F(-2)]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 36, antiderivative size = 70 \[ \int \frac {x^{-1+\frac {q}{2}}}{\sqrt {b x^n+c x^{2 n-q}+a x^q}} \, dx=-\frac {\text {arctanh}\left (\frac {x^{q/2} \left (2 a+b x^{n-q}\right )}{2 \sqrt {a} \sqrt {b x^n+c x^{2 n-q}+a x^q}}\right )}{\sqrt {a} (n-q)} \]

[Out]

-arctanh(1/2*x^(1/2*q)*(2*a+b*x^(n-q))/a^(1/2)/(b*x^n+c*x^(2*n-q)+a*x^q)^(1/2))/(n-q)/a^(1/2)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {1927, 212} \[ \int \frac {x^{-1+\frac {q}{2}}}{\sqrt {b x^n+c x^{2 n-q}+a x^q}} \, dx=-\frac {\text {arctanh}\left (\frac {x^{q/2} \left (2 a+b x^{n-q}\right )}{2 \sqrt {a} \sqrt {a x^q+b x^n+c x^{2 n-q}}}\right )}{\sqrt {a} (n-q)} \]

[In]

Int[x^(-1 + q/2)/Sqrt[b*x^n + c*x^(2*n - q) + a*x^q],x]

[Out]

-(ArcTanh[(x^(q/2)*(2*a + b*x^(n - q)))/(2*Sqrt[a]*Sqrt[b*x^n + c*x^(2*n - q) + a*x^q])]/(Sqrt[a]*(n - q)))

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 1927

Int[(x_)^(m_.)/Sqrt[(b_.)*(x_)^(n_.) + (a_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.)], x_Symbol] :> Dist[-2/(n - q), Sub
st[Int[1/(4*a - x^2), x], x, x^(m + 1)*((2*a + b*x^(n - q))/Sqrt[a*x^q + b*x^n + c*x^r])], x] /; FreeQ[{a, b,
c, m, n, q, r}, x] && EqQ[r, 2*n - q] && PosQ[n - q] && NeQ[b^2 - 4*a*c, 0] && EqQ[m, q/2 - 1]

Rubi steps \begin{align*} \text {integral}& = -\frac {2 \text {Subst}\left (\int \frac {1}{4 a-x^2} \, dx,x,\frac {x^{q/2} \left (2 a+b x^{n-q}\right )}{\sqrt {b x^n+c x^{2 n-q}+a x^q}}\right )}{n-q} \\ & = -\frac {\tanh ^{-1}\left (\frac {x^{q/2} \left (2 a+b x^{n-q}\right )}{2 \sqrt {a} \sqrt {b x^n+c x^{2 n-q}+a x^q}}\right )}{\sqrt {a} (n-q)} \\ \end{align*}

Mathematica [F]

\[ \int \frac {x^{-1+\frac {q}{2}}}{\sqrt {b x^n+c x^{2 n-q}+a x^q}} \, dx=\int \frac {x^{-1+\frac {q}{2}}}{\sqrt {b x^n+c x^{2 n-q}+a x^q}} \, dx \]

[In]

Integrate[x^(-1 + q/2)/Sqrt[b*x^n + c*x^(2*n - q) + a*x^q],x]

[Out]

Integrate[x^(-1 + q/2)/Sqrt[b*x^n + c*x^(2*n - q) + a*x^q], x]

Maple [F]

\[\int \frac {x^{-1+\frac {q}{2}}}{\sqrt {b \,x^{n}+c \,x^{2 n -q}+a \,x^{q}}}d x\]

[In]

int(x^(-1+1/2*q)/(b*x^n+c*x^(2*n-q)+a*x^q)^(1/2),x)

[Out]

int(x^(-1+1/2*q)/(b*x^n+c*x^(2*n-q)+a*x^q)^(1/2),x)

Fricas [F(-2)]

Exception generated. \[ \int \frac {x^{-1+\frac {q}{2}}}{\sqrt {b x^n+c x^{2 n-q}+a x^q}} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate(x^(-1+1/2*q)/(b*x^n+c*x^(2*n-q)+a*x^q)^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (co
nstant residues)

Sympy [F]

\[ \int \frac {x^{-1+\frac {q}{2}}}{\sqrt {b x^n+c x^{2 n-q}+a x^q}} \, dx=\int \frac {x^{\frac {q}{2} - 1}}{\sqrt {a x^{q} + b x^{n} + c x^{2 n - q}}}\, dx \]

[In]

integrate(x**(-1+1/2*q)/(b*x**n+c*x**(2*n-q)+a*x**q)**(1/2),x)

[Out]

Integral(x**(q/2 - 1)/sqrt(a*x**q + b*x**n + c*x**(2*n - q)), x)

Maxima [F]

\[ \int \frac {x^{-1+\frac {q}{2}}}{\sqrt {b x^n+c x^{2 n-q}+a x^q}} \, dx=\int { \frac {x^{\frac {1}{2} \, q - 1}}{\sqrt {c x^{2 \, n - q} + b x^{n} + a x^{q}}} \,d x } \]

[In]

integrate(x^(-1+1/2*q)/(b*x^n+c*x^(2*n-q)+a*x^q)^(1/2),x, algorithm="maxima")

[Out]

integrate(x^(1/2*q - 1)/sqrt(c*x^(2*n - q) + b*x^n + a*x^q), x)

Giac [F]

\[ \int \frac {x^{-1+\frac {q}{2}}}{\sqrt {b x^n+c x^{2 n-q}+a x^q}} \, dx=\int { \frac {x^{\frac {1}{2} \, q - 1}}{\sqrt {c x^{2 \, n - q} + b x^{n} + a x^{q}}} \,d x } \]

[In]

integrate(x^(-1+1/2*q)/(b*x^n+c*x^(2*n-q)+a*x^q)^(1/2),x, algorithm="giac")

[Out]

integrate(x^(1/2*q - 1)/sqrt(c*x^(2*n - q) + b*x^n + a*x^q), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {x^{-1+\frac {q}{2}}}{\sqrt {b x^n+c x^{2 n-q}+a x^q}} \, dx=\int \frac {x^{\frac {q}{2}-1}}{\sqrt {b\,x^n+a\,x^q+c\,x^{2\,n-q}}} \,d x \]

[In]

int(x^(q/2 - 1)/(b*x^n + a*x^q + c*x^(2*n - q))^(1/2),x)

[Out]

int(x^(q/2 - 1)/(b*x^n + a*x^q + c*x^(2*n - q))^(1/2), x)